package company;

import java.util.Scanner;

public class demo1 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int num=sc.nextInt();
        int n=sc.nextInt();
        int sum=0;
        while(n>=1){
            sum=sum+num;
            num=num*10+num;
            n--;
        }
        System.out.println(sum);
    }
}
